import axios from '@/utils/fetch';
import Vue from 'vue';
export default {
    install() {
        Vue.prototype.dict = dictionary;
    }
}
const dictionary = {

		get : function(dictionaryId) {
			return axios({
				url :  '/sys/dictionary/listById/' + dictionaryId,
				method : 'get'
			}).then(r=>{
				r.data.forEach(d=>{
					d.id = d.dictKey;
					d.name = d.dictValue;
				});
				return r.data;
			});
		}
	};